1. Field of the Invention
The present invention relates to a grant/seize processing method with respect to a Moreta-mode when converting an object-oriented CHILL to a CHILL, and in particular to an improved grant/seize processing method with respect to a Moreta-mode when converting an object-oriented CHILL to a CHILL which makes it possible to define a syntax having a new characteristic which is capable of granting/seizing by the module unit with respect to a Moreta mode when converting an object-oriented CHILL into the CHILL and grant/seize by the module unit in the CHILL with respect to the Moreta-mode by using the syntax, for thus achieving an excellent effect for providing a function similar to the grant/seize of an actual Moreta-mode.
2. Description of the Conventional Art
The object-oriented CCITT high level language (CHILL) is a standard computer programming language which was recommended by ITU-T and is capable of improving a reusing and module characteristic of a communication system software. Major characteristics of the object-oriented CHILL is a better object-oriented feature, an overloading property, and a generosity. Generally, the object-oriented feature is referred to a predetermined concept such as an information hiding, an abstract data, an inheritance, and a polymorphism feature. In the object-oriented CHILL, the above-described features are defined in the Moreta-mode. Here, the Moreta-mode is a complicated mode and is classified into a module mode having a sequential characteristic, a region mode having a monitoring characteristic, and a task mode having a parallel characteristic.
Here, the module mode has an attribute in which an element data and an element procedure are combined, and a module characteristic in which an executable statement is not given. This module mode is sequentially executed, and has a characteristic which is not excluded from each other with respect to an external multiple access.
The region mode has an attribute of a module mode and has a threshold value with respect to an element procedure having a public visibility which may be externally checked. This region mode is sequentially performed and has a characteristic of excluding from each other by using a semaphores with respect to an external multiple access.
The task mode has an attribute of the module mode, and a parallel characteristic. In addition, this task mode has a thread control of a message queue of a buffer location and a signal name in accordance with the implementation dependent. In particular, the task mode is performed in parallel, and selects a sequential message with respect to an external multiple access, and has an inter-exclusive characteristic.
With the above-described characteristics, the Moreta-mode has a specification object for external interface, an actually performed object, and a body for performing the predetermined library.
The succession of the Moreta-mode will now be explained. In order to define a derived module mode, in the module mode based on the object-oriented characteristic, it is possible to define the derived module mode by adding a new attribute based on the name of the upper module mode. In addition, since the definition of the module mode is simple and flexible, the module mode may effectively be defined by a new function to the existing module mode. Various derived module modes from the upper module mode can have the attribute of the upper module mode.
Generally, the upper module mode and the derived module mode have an is-a relationship, and the derived module mode may have attributes more than the upper module mode. Here, the is-a relationship denotes that all elements and the visibility of elements are succeeded to the derived module mode. The succession of the elements of the upper module mode and the visibility of each element are succeeded based on the following rules.
The constructor and destructor of the upper module mode are not succeeded.
All elements (namely, such as a SYNONYM statement, a SYNMODE/NEWMODE statement, a DCL statement, a method definition and a GRANT/SEIZE statement) except for the constructor and destructor method which form the upper module mode are directly succeeded.
Since the GRANT statement is directly succeeded, the range of the visibility with respect to each element in the upper module mode is succeeded without any changes.
The visibility of the Moreta-mode will now be explained.
The internal attribute of the Moreta-mode does not externally appear. In order to view the internal attribute of the Moreta-mode from the outside, in the Moreta-mode, the GRANT statement is used. The Moreta-mode has the following three visibility.
The private visibility: The range of the visibility is in its module mode.
The internal visibility: The range of the visibility is from its range to the derived module mode which is derived from itself.
The public visibility: The range of the visibility is to the outer range of the module including itself and derived module mode.
The conversion rule of the Moreta-mode will now be explained. There are two methods for developing the object-oriented CHILL compiler. The first method is directed to converting the object-oriented CHILL to a code which is adapted to the existing CHILL language grammar and using the existing CHILL compiler. The second method is directed to newly developing the compiler for the object-oriented CHILL which is a new language. In the present invention, as the first method, the object-oriented CHILL compiler is considered, and the object-oriented converter for converting the object-oriented CHILL to the CHILL is considered. Therefore, it is necessary to establish the conversion rule for converting the object-oriented CHILL to the CHILL. Since the Moreta-mode is the mode defined by the object-oriented CHILL, so that the functions of the CHILL must be used. The Moreta-mode is converted into the module when the mode is converted into the existing CHILL, and the elements of the Moreta-mode are created as the internal elements. If the Moreta-mode is the succeeded and derived Moreta-mode, the elements of the upper Moreta-mode succeeded are included as the module internal elements. Here, there are the following elements of the Moreta-mode.
The SYNONYM statement PA1 The SYNMODE/NEWMODE statement except for the Moreta-mode PA1 The DCL statement PA1 The procedure definition PA1 The process definition (Except in the region mode or the task mode) PA1 The signal definition (Except in the task mode) PA1 The public/seize statement
The method for converting to the CHILL from the elements of the Moreta-mode is directed to converting the data declared to the DCL into the elements of the STRUCT mode having the Moreta name. Namely, the remaining elements are converted into the CHILL name in accordance with the name translation rule. Therefore, when one Moreta-mode is changed to the CHILL, there are created a predetermined number of names. In addition, when the mode is changed to the CHILL, it is impossible to know the relationship between the Moreta-mode and the elements thereof.
The GRANT/SEIZE of the Moreta-mode will now be explained. The Moreta-mode of the object oriented CHILL is converted into the module of the CHILL. The module in the CHILL has a program structure for determining the visibility of the name thereof, and it is possible to use the name defined in the module. In order to use the name existing in the upper module, it is necessary to seize the name. In order to use the name in the out of module, the name must be granted. Therefore, the grant/seize of the CHILL is done by the name unit. However, the grant/seize with respect to the Moreta-mode of the object-oriented CHILL is not granted by one name unit. Namely, the characteristic of the grant/seize is provided by the module unit. When converting the grant/seize of the Moreta-mode by using the grant/seize statement of the CHILL, all the name having the public or internal visibility must be granted/seized with respect to the Moreta-mode name as well as the name which was obtained by converting the elements and the succeeded name.
Therefore, when granting/seizing the Moreta-mode and the name having the Moreta-mode, many names must be granted/seized. In addition, it is impossible to check a collision between the elements which are granted/seized. In order to avoid the above-described problems, a grantm/seizem which is a statement having a new characteristic which is capable of granting/seizing by the module unit with respect to the Moreta-mode is defined. Here, the grantm/seizem is the name of the statement for providing a function of granting/seizing by the module unit, and another name may be used for the name of the statement. The grantm/seizem is capable of providing a function which is capable of granting/seizing by the module unit with respect to the module created in the Moreta-mode, so that it is possible to provide a function which is similar to the grant/seize function of the Moreta-mode. In addition, in the driving mode, the upper mode in the derived mode so as to obtain the information succeeded from the derived mode is created as the seizem upper mode name, so that the information succeeded is defined. In order to classify the public and internal information which externally appear in one module and the private information which is used for the internal purpose, a new public statement is defined. Since the CHILL can not provide the visibility such as the public, internal, private, etc which are provided in the Moreta-mode, when showing the module by using the grantm/seizem, the private name may be shown, for thus causing errors. In order to ovoid the above-described problems, the names of the elements having the public and internal visibility are arranged together with a reserved word which is called the public with respect to the module which is converted by the Moreta-mode, and then the names thereof are shown, for thus defining the information for externally showing them.
As described above, when converting the object-oriented CHILL into the CHILL, and the GRANT or SEIZE with respect to the Moreta-mode into the grant and seize of the existing CHILL, many grant/seize must be disadvantageously shown, so that it is impossible to check the collision therebetween.